package model

type CreateEcsReqModel struct {
	FleetId             string          `json:"fleet_id" validate:"required,uuid"`
	EcsGroupId          string          `json:"ecs_group_id"`
	ProjectId           string          `json:"project_id" validate:"project_id"`
	Name                string          `json:"instance_name" validate:"required,min=1,max=64"`
	VmNum               int             `json:"vm_num"`
	SubnetId            string          `json:"subnet_id" validate:"required,uuid"`
	VpcId               string          `json:"vpc_id" validate:"required,uuid"`
	KeyName             string          `json:"key_name" validate:"required,min=1,max=64"`
	AvailableZone       string          `json:"available_zones"`
	ImageID             string          `json:"image_id" validate:"required,uuid"`
	FlavorId            string          `json:"flavor_id" validate:"required,flavorId" reg_error_info:"Incorrect format"`
	Disks               []Disk          `json:"disks" validate:"required,min=1,max=1,dive"`
	SecurityGroups      []SecurityGroup `json:"security_groups" validate:"required,min=1,max=10,dive"`
	Eip                 Eip             `json:"eip" validate:"required,dive"`
	InstanceTags        []InstanceTag   `json:"instance_tags,omitempty" validate:"omitempty,min=0,max=10"`
	EnterpriseProjectId string          `json:"enterprise_project_id"`
	AgencyName          string          `json:"agency_name"`
}

type ListInstanceResponse struct {
	TotalNumber int            `json:"total_number"`
	Count       int            `json:"count"`
	Instances   []InstanceInfo `json:"instances"`
}

type InstanceInfo struct {
	Name         string `json:"instance_name"`
	InstanceId   string `json:"instance_id"`
	GroupId      string `json:"group_id"`
	HealthStatus string `json:"health_status"`
	CreatedAt    string `json:"created_at"`
	ActiveAt     string `json:"active_at"`
}

type ActivityList struct {
	GroupId    string `json:"scaling_group_id""`
	JobId      string `json:"job_id"`
	TaskId     string `json:"task_id"`
	State      string `json:"state"`
	JobType    string `json:"job_type"`
	Num        int    `json:"num"`
	FailReason string `json:"fail_reason"`
	CreateAt   string `json:"create_at"`
}

type ListActivityResponse struct {
	TotalNum     int            `json:"total"`
	Count        int            `json:"count"`
	ActivityList []ActivityList `json:"activity_list"`
}
